package interview.algorithms.again_in_interview;

/**
 * @author fance
 * @date 2018/7/17 10:23
 */
public class OOM {
  /*  static class OOMObject{}

    public static void main(String[] args) {
        List<OOMObject> list = new ArrayList<>();
        while (true) {
            list.add(new OOMObject());
        }
    }*/
    /* 害我死机了。
    private void dontStop() {
        while (true){}
    }
    public void stackThread() {
        while (true) {
           new Thread(() -> dontStop()).start();

        }
    }

    public static void main(String[] args) {
        OOM oom = new OOM();
        oom.stackThread();
    }*/
}
